<template>
    <div class="nav-bar">
        <div class="left" @click="honmeview"><slot name="left"></slot></div>
        <div class="center"><slot></slot></div>
        <div class="right" @click="openDrawer"  ><slot name="right"></slot></div>
    </div>
</template>

<script>
export default{
    methods:{
        honmeview(){
          if(this.$route.path.startsWith('/admin')){
            this.$router.push('/admin')
          }else{
            this.$router.push('/')
          }
        }
    }

}

</script>
<style  scoped>
.nav-bar{
    background-color:#ffffff;
    color: black;
    display:flex;
    left:0;
    top: 0;
    width:100%;
    height: 87.5px;
    line-height: 45px;
    position: fixed;
    z-index: 1000;
   text-align: center;

}
.center{
    flex:1;
    margin-top: 20px;
    text-align: center;
}
.right{
    margin-top: 20px;
    margin-right: 20px;
    text-align: right;
    width: 30px;
}

</style>
